import Endpoint from '@/common/plugins/fofservice/modules/endpoint'

class ${classInfo.className}Service {
    async list(param) {
        const response = await listEndpoint.get(param)
        return response
    }

    async export(param) {
        const response = await exportEndpoint.get(param)
        return response
    }


    async update(param) {
        const response = await updateEndpoint.postJson(param)
        return response
    }

    async delete(id) {
        const response = await deleteEndpoint.del({id})
        return response
    }
}

export const listEndpoint = new Endpoint('/api/${classInfo.className?uncap_first}/list')
export const updateEndpoint = new Endpoint('/api/${classInfo.className?uncap_first}/update')
export const deleteEndpoint = new Endpoint('/api/${classInfo.className?uncap_first}/delete')
export const exportEndpoint = new Endpoint('/api/${classInfo.className?uncap_first}/export')

export default new ${classInfo.className}Service()
